package com.jkgl.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 消息持久化表--对RedisStream的数据进行持久化
 * </p>
 *
 * @author w020304m
 * @since 2025-03-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Builder
@Accessors(chain = true)
@TableName("mes_persistence")
public class MesPersistence implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * MessageId
     */
    private String messageId;

    /**
     *  1 error/ 2 report /3 notice
     */
    private Integer messageType;

    /**
     * 内容
     */
    private String context;

    /**
     * 是否成功消费  1被创建/2被消费
     */
    private Integer isSuccess;

    /**
     * 生成时间
     */
    private LocalDateTime createTime;


    /**
     * 是否成功发送 1是/2否
     */
    private Integer isSend;


    private Long userId;
}
